<template>
  <div class="my-index">
    <div class="my-head">
      <easy-head :headName="headName" :returnUrl="returnUrl"></easy-head>
    </div>
    <div class="myindex-center">
      <!--头像和昵称-->
      <div class="user-data">
        <div><img src="../../../static/img/index-end/5G.jpg" alt=""></div>
        <div>
          <span>用户名称：问奈何</span>
          <span>会员等级：普通会员</span>
          <span >会员有效时间：2019-11-12</span>
        </div>
      </div>
      <!--个人中心-->
      <div class="user-nav">
        <div>
          <div> <svg class="icon" aria-hidden="true">
          <use xlink:href="#iconvip"></use>
        </svg> 会员充值</div>
          <div @click="goBuyHtml('/openvip')"><svg class="icon" aria-hidden="true">
            <use xlink:href="#iconfanhuijiantou"></use>
          </svg></div>
        </div>
        <div>
          <div> <svg class="icon" aria-hidden="true">
            <use xlink:href="#iconicon-order"></use>
          </svg > 我的订单</div>
          <div @click="goBuyHtml('/myorder')"><svg class="icon" aria-hidden="true">
            <use xlink:href="#iconfanhuijiantou"></use>
          </svg></div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
  import easyHead from "../easyHead/easyHead"

  export default {
    name: "myindex",
    data() {
      return {
        returnUrl: "/index",
        headName: "我的页面",
      }
    },
    components: {
      easyHead
    },
    methods:{
      goBuyHtml(url) {
        this.$router.push({path: url})
      },
    }
  }
</script>

<style scoped>

  .user-nav>div>:last-child{
    width: 10%;
    margin-left: 38%;
    text-align: center;
  }

  .user-nav>div>div{
    width: 50%;
    float: left;
  }
  .user-nav>div{
    float: left;
    height: 1rem;
    line-height: 1rem;
    border-bottom: solid 1px red;
    margin-left: 2.5%;
    width: 95%;
  }
  .user-nav{
    font-size: 0.5rem;

  }
  .user-data>>>img{
    width: 100%;
    height: 80%;
    margin-left: 10%;
    margin-top: 10%;
    border-radius: 50%;
  }
  .user-data>div{
    float: left;
    height: 100%;
  }

  .user-data>:first-child{
    width: 30%;
  }
  .user-data>:last-child>span{
    float: left;

  }

  .user-data>:last-child{
    margin-left: 5%;
    width: 65%;
    line-height: 1rem;
  }
  .user-data {

    background-image: url("../../../static/img/user-bg.jpg");
    height: 3rem;
    font-size: 0.5rem;
  }
</style>
